package com.xxx.control.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xxx.control.R
import com.xxx.control.bean.MsgBean

/**
 * Create by Sxl on 2021/12/30.
 */
class MsgGoodsAdapter : BaseQuickAdapter<MsgBean, BaseViewHolder>(R.layout.item_goods_msg) {

    override fun convert(helper: BaseViewHolder, item: MsgBean) {

        helper.setText(R.id.tv_msg, item.msg)
            .setTextColor(
                R.id.tv_msg,
                if (item.isRed) context.resources.getColor(R.color.red) else context.resources.getColor(
                    R.color.white
                )
            )

    }

}